package com.liu.service.impl;

import com.liu.entity.Disease;
import com.liu.mapper.DiseaseMapper;
import com.liu.service.DiseaseService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Disease)表服务实现类
 *
 * @author makejava
 * @since 2023-02-09 09:37:02
 */
@Service("diseaseServiceImpl")
@Transactional
public class DiseaseServiceImpl implements DiseaseService {
    @Resource
    private DiseaseMapper diseaseMapper;


    @Override
    public Disease queryById(Integer id) {
        return this.diseaseMapper.queryById(id);
    }

    @Override
    public List<Disease> findAll() {
        return this.diseaseMapper.findAll();
    }

    @Override
    public List<Disease> queryAllByLimit(Integer pageNum, Integer pageSize, String name) {
        return this.diseaseMapper.queryAllByLimit(pageNum,pageSize,name);
    }

    @Override
    public long count(String name) {
        return this.diseaseMapper.count(name);
    }

    @Override
    public int insert(Disease disease) {
        return this.diseaseMapper.insert(disease);
    }

    @Override
    public int insertBatch(List<Disease> entities) {
        return this.diseaseMapper.insertBatch(entities);
    }

    @Override
    public int update(Disease disease) {
        return this.diseaseMapper.update(disease);
    }

    @Override
    public int deleteById(Integer id) {
        return this.diseaseMapper.deleteById(id);
    }

    @Override
    public int deleteByIds(List<Integer> ids) {
        return this.diseaseMapper.deleteByIds(ids);
    }
}
